<!DOCTYPE html>
<html>

	<head>
		<title></title>
		<#include "/header.html">
			<script src="${request.contextPath}/statics/libs/ajaxupload.js"></script>
			<link rel="stylesheet" href="${request.contextPath}/statics/css/bootstrap-table.min.css">
			<link rel="stylesheet" href="${request.contextPath}/statics/plugins/treegrid/jquery.treegrid.css">
			<script src="${request.contextPath}/statics/libs/bootstrap-table.min.js"></script>
			<script src="${request.contextPath}/statics/plugins/treegrid/jquery.treegrid.min.js"></script>
			<script src="${request.contextPath}/statics/plugins/treegrid/jquery.treegrid.bootstrap3.js"></script>
			<script src="${request.contextPath}/statics/plugins/treegrid/jquery.treegrid.extension.js"></script>
			<script src="${request.contextPath}/statics/plugins/treegrid/tree.table.js"></script>
			<script src="${request.contextPath}/statics/ckeditor/ckeditor.js"></script>
			<style>
				.hand:hover{
					cursor:pointer;
				}
			</style>
	</head>

	<body>
		<div id="rrapp" v-cloak>
			<div v-show="showList">
				<div v-show="!showHtml">
					<div class="grid-btn">
						<a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
						<a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
						<!--<a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>-->
						<!--<a @click="getCourseSmallLike"><input type="text" id="findCourseSmall"/>查询</a>-->
					</div>
					<table id="jqGrid"></table>
					<div id="jqGridPager"></div>
				</div>
				<div v-show="showHtml">
					<a class="btn btn-primary" @click="showHtml=!showHtml">返回</a>
					<div id="showHtml"></div>
				</div>
			</div>
			<div class="modal fade" id="courseSmallClassificationBox" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
				<div class="modal-dialog" role="document">
					<div class="modal-content">
						<div class="modal-header">
							<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
							<h4 class="modal-title" id="myModalLabel">微课分类修改</h4>
						</div>
						<div class="modal-body">
							<form>
								<div class="form-group">
									<label for="recipient-name" class="control-label">大分类:</label>
									<select id="recipient-name" class="form-control" v-model="courseSmallClassificationFirstId" @change="getCourseSmallClassificationSecond()">
										<option v-for="(item,index) in courseSmallClassificationFirst" :key="index" :value="item.id">{{item.name}}</option>
									</select>
								</div>
								<div class="form-group">
									<label for="message-text" class="control-label">中分类:</label>
									<select id="message-text" class="form-control" v-model="courseSmallClassificationSecondId" @change="getCourseSmallClassificationThird()">
										<option v-for="(item,index) in courseSmallClassificationSecond" :key="index" :value="item.id">{{item.name}}</option>
									</select>
								</div>
								<div class="form-group">
									<label for="message-textSmall" class="control-label">小分类:</label>
									<select id="message-textSmall" class="form-control" v-model="courseSmallClassificationThirdId" @change="setCourseSmallClassificationId()">
										<option v-for="(item,index) in courseSmallClassificationThird" :key="index" :value="item.id">{{item.name}}</option>
									</select>
								</div>
							</form>
						</div>
						<div class="modal-footer">
							<button type="button" class="btn btn-primary" data-dismiss="modal">确定</button>
							<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
						</div>
					</div>
				</div>
			</div>
			<div v-show="!showList" class="panel panel-default">
				<div class="panel-heading">{{title}}</div>
				<form class="form-horizontal">
					<div class="form-group">
						<div class="col-sm-2 control-label">标题</div>
						<div class="col-sm-10">
							<input type="text" class="form-control" v-model="courseSmall.title" placeholder="" />
						</div>
					</div>
					<div class="form-group">
						<div class="col-sm-2 control-label">分类</div>
						<div class="col-sm-10" style="padding-top: 7px;">
							<input type="text" v-model="courseSmall.classificationName" class="form-control" disabled />
							<button style="float: right;margin-top: 10px;" type="button" class="btn btn-primary" data-toggle="modal" data-target="#courseSmallClassificationBox">选择分类</button>
						</div>
					</div>

					<div class="form-group">
						<div class="col-sm-2 control-label">封面图片</div>
						<div class="col-sm-10">
							<img id="pic" width="80px" height="80px">
							<!--<input class="form-control" type="hidden" v-model="course.coverPath" placeholder="封面图片">-->
							<!--<input type="text" class="form-control" v-model="course.coverPath" placeholder="封面图片路径"/>-->
							<a class="btn btn-primary" id="upload"><i class="fa fa-plus"></i>&nbsp;上传文件</a>
						</div>
					</div>

					<div class="form-group">
						<div class="col-sm-2 control-label">音视频</div>
						<div class="col-sm-10">
							<select class="form-control" v-model="courseSmall.type">
								<option value="0">视频</option>
								<option value="1">音频</option>
							</select>
						</div>
					</div>

					<div class="form-group">
						<div class="col-sm-2 control-label">音视频地址</div>
						<div class="col-sm-10">
							<input type="text" class="form-control" v-model="courseSmall.videoPath" placeholder="数据地址" />
						</div>
					</div>

					<div class="form-group">
						<div class="col-sm-2 control-label">微课程简介</div>
						<div class="col-sm-10">
							<input type="text" class="form-control" v-model="courseSmall.introduce" placeholder="简介" />
						</div>
					</div>

					<!--<div style="width: 1000px;min-height: 420px;">-->
					<!--<div style="padding: 7px 15px 0px 15px;display: inline-block;margin-bottom: 0px;text-align: right;width: 13%;float: left;">-->
					<!--详情-->
					<!--</div>-->
					<!--<div style="padding-left: 0px;float: left;width: 80%;padding-right: 15px;display: inline-block;">-->
					<!--<textarea name="description" id="description" /></textarea>-->
					<!--</div>-->
					<!--</div>-->
					<div class="form-group">
						<div class="col-sm-2 control-label">PDF地址</div>
						<div class="col-sm-10">
							<input type="text" class="form-control" v-model="courseSmall.picturePath" placeholder="PDF" />
						</div>
					</div>

					<div class="form-group">
						<div class="col-sm-2 control-label"></div>
						<input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定" /> &nbsp;&nbsp;
						<input type="button" class="btn btn-warning" @click="reload" value="返回" />
					</div>
				</form>
			</div>
		</div>

		<script src="${request.contextPath}/statics/js/modules/course/coursesmall.js?_${.now?long}"></script>
	</body>

</html>